﻿[assembly:
        System.Web.UI.WebResource("BM.Tools.WebControls.MForm.Controls.Modifiers.Additions.TabbedDisplayAddition.js",
                "application/x-javascript")]
[assembly:
        System.Web.UI.WebResource("BM.Tools.WebControls.MForm.Controls.Modifiers.Additions.TabbedDisplayAddition.debug.js",
                "application/x-javascript")]
namespace BM.Tools.WebControls.MForm.Controls.Modifiers.Additions
{
    using System.ComponentModel;
    using System.Diagnostics.CodeAnalysis;

    using AjaxControlToolkit;

    using BM.Tools.WebControls.MForm.Controls.Additions;
    using BM.Tools.WebControls.MForm.Controls.Helper;

    /// <summary>
    /// The control that informs the item that it is displayed in a tab
    /// </summary>
    [DesignTimeVisible]
    [ClientScriptResource("BM.Tools.WebControls.MForm", "BM.Tools.WebControls.MForm.Controls.ExtenderDuplicator.js")]
    [ClientScriptResource("BM.Tools.WebControls.MForm",
            "BM.Tools.WebControls.MForm.Controls.Modifiers.Additions.TabbedDisplayAddition.js")]
    internal class TabbedDisplayAddition : Addition
    {                
        private readonly TabbedDisplayModifier modifier;

        /// <summary>
        /// Initializes a new instance of the <see cref="TabbedDisplayAddition"/> class. 
        /// </summary>
        /// <param name="modifier">
        /// The modifier.
        /// </param>
        public TabbedDisplayAddition(TabbedDisplayModifier modifier)
        {
            this.modifier = modifier;
        }

        /// <summary>
        /// Gets tab container id.
        /// </summary>        
        [AttributeProperty(Name = "TCRef")]
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "It is used by the attribute property")]        
        public string TabContainerId
        {
            get
            {
                return modifier.TabContainerId;
            }
        }

        /// <summary>
        /// Gets the tab created client side event function.
        /// </summary>        
        [AttributeProperty(Name = "clientTabCreated")]
        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "It is used by the attribute property")]
        public string OnClientTabCreated
        {
            get
            {
                return modifier.OnClientTabCreated;
            }
        }
    }
}